﻿using System;
using System.Collections.Generic;
using Cubicle.Core.DataContracts;

namespace Cubicle.Core.Interfaces
{
    public interface IRObject
    {
        IDictionary<string, object> Metadata { get; }

        // Each IRObject has an underlying object
        object Object { get; set; }

        IHandleParser Parser { get; set; }

        string Key { get; set; }

        string Handle { get; set; }

        // The object references its repository
        IRepository Repo { get; }

        event EventHandler<RepoEventArgs> Remove;
        void OnRemove(object sender, RepoEventArgs args);
        event EventHandler<RepoEventArgs> Get;
        void OnGet(object sender, RepoEventArgs args);
        event EventHandler<RepoEventArgs> Set;
        void OnSet(object sender, RepoEventArgs args);
    }
}
